<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title>聪慧科技 | 用户管理</title>
    <link rel="stylesheet" href="../css/style.default.css" type="text/css"/>
    <script type="text/javascript" src="../js/plugins/jquery-1.7.min.js"></script>
    <script type="text/javascript" src="../js/plugins/jquery-ui-1.8.16.custom.min.js"></script>
    <script type="text/javascript" src="../js/plugins/jquery.cookie.js"></script>
    <script type="text/javascript" src="../js/plugins/jquery.uniform.min.js"></script>
    <script type="text/javascript" src="../js/plugins/jquery.validate.min.js"></script>
    <script type="text/javascript" src="../js/plugins/jquery.tagsinput.min.js"></script>
    <script type="text/javascript" src="../js/plugins/charCount.js"></script>
    <script type="text/javascript" src="../js/plugins/ui.spinner.min.js"></script>
    <script type="text/javascript" src="../js/plugins/chosen.jquery.min.js"></script>
    <script type="text/javascript" src="../js/custom/general.js"></script>
    <script type="text/javascript" src="../js/custom/forms.js"></script>


    <!--[if IE 9]>
    <link rel="stylesheet" media="screen" href="css/style.ie9.css"/>
    <![endif]-->
    <!--[if IE 8]>
    <link rel="stylesheet" media="screen" href="css/style.ie8.css"/>
    <![endif]-->
    <!--[if lt IE 9]>
    <script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
    <![endif]-->
</head>

<body class="withvernav">
<div class="bodywrapper">

    <div th:replace="~{common/top::top}"></div>

    <div class="vernav2 iconmenu">
        <ul>
            <li class="current"><a href="#userManage" class="editor">员工管理</a> <span class="arrow"></span>
                <ul id="userManage">
                    <li class="current"><a th:href="@{/employee/userAdd}">录入员工信息</a></li>
                    <!--class="current"选中的黄字特效-->
                    <li><a th:href="@{/employee/userChange}">用员工信息列表</a></li>

                </ul>
            </li>



            <li><a href="#support" class="error">技术支持</a> <span class="arrow"></span>
                <ul id="support">
                    <li><a href="../teamName.html" th:href="@{/teamName}">技术团队</a></li>
                    <li><a href="../teamCantact.html" th:href="@{/teamCantact}">联系我们</a></li>

                </ul>
            </li>

        </ul>
        <a class="togglemenu"></a> <br/>
        <br/>
    </div>
    <!--leftmenu-->

    <div class="centercontent">
        <div class="pageheader">
            <h1 class="pagetitle">员工管理</h1>
            <span class="pagedesc">请为新用户添加用户名、密码、角色标识、员工标识</span>
            <!--<ul class="hornav">
              <li class="current"><a href="#basicform">Basic</a></li>
              <li><a href="#validation">Validation</a></li>
            </ul>-->
        </div>
        <!--pageheader-->

        <div id="contentwrapper" class="contentwrapper">
            <div id="basicform" class="subcontent">
                <div class="contenttitle2">
                    <!--<h3>Form Style 1</h3>-->
                </div>
                <!--contenttitle-->
                <!--员工信息输入表-->
                <form th:action="@{/employee/userAdd}" class="stdform" method="post" novalidate>
                    <p>
                        <label for="userName">输入用户名：</label>
                        <span class="field">
            <input type="text" name="userName" class="mediuminput"
                   id="userName"
                   th:value="${employee !=null ? employee.userName:''}"
                   required maxlength="20"/>
            </span>
                        <label th:type="hidden"></label>
                        <span th:text="${errorMessages != null and  errorMessages.containsKey('userName')? errorMessages.userName: ''}">错误信息</span>
                    </p>


                    <p>
                        <label for="passWord">输入登录密码：</label>
                        <span class="field">
            <input type="text" name="passWord" class="mediuminput"
                   id="passWord"
                   th:value="${employee !=null ? employee.passWord:''}"/>
            </span>
                        <label th:type="hidden"></label>
                        <span th:text="${errorMessages != null and  errorMessages.containsKey('passWord')? errorMessages.passWord: ''}">错误信息</span>
                    </p>
                    <p>
                        <label for="sex">输入性别：</label>
                        <span class="field">
            <input type="text" name="sex" class="mediuminput"
                   id="sex" th:value="${employee !=null ? employee.sex:''}"/>
            </span>
                        <label th:type="hidden"></label>
                        <span th:text="${errorMessages != null and  errorMessages.containsKey('sex')? errorMessages.sex: ''}">错误信息</span>
                    </p>

                    <p>
                        <label for="manager">是否为管理人员（是/否）：</label>
                        <span class="field">
            <input type="text" name="manager" class="mediuminput"
                   id="manager" th:value="${employee !=null ? employee.manager:''}"/>
            </span>
                        <label th:type="hidden"></label>
                        <span th:text="${errorMessages != null and  errorMessages.containsKey('manager')? errorMessages.manager: ''}">错误信息</span>
                    </p>
                    <p>
                        <label for="PDate">输入创建时间：</label>
                        <span class="field">
            <input type="text" name="PDate" class="mediuminput"
                   id="PDate" th:value="${employee !=null ? employee.PDate:''}"/>
            </span></p>
                    <p>
                        <label for="brithday">输入生日：</label>
                        <span class="field">
            <input type="text" name="brithday" class="mediuminput"
                   id="brithday" th:value="${employee  !=null ? employee.brithday:''}"/>
            </span>
                    </p>

                    <p>
                        <label for="introduction">输入简介：</label>
                        <span class="field">
            <input type="text" name="introduction" class="mediuminput" id="introduction"
                   th:value="${employee !=null ? employee.introduction:''}"/>
            </span></p>
                    <br clear="all"/>
                    <br/>
                    <p class="stdformbutton">
                        <button type="submit" class="submit radius2">确认添加</button>
                        <input type="reset" class="reset radius2" value="重置"/>
                    </p>
                </form>
                <br/>
                <br/>
            </div>
            <!--subcontent-->

        </div>
        <!--contentwrapper-->

    </div>
    <!-- centercontent -->

</div>
<!--bodywrapper-->


<script>
    $('form.stdform').submit(function (event) {
        //调用表单对象的验证方法，如果验证方法返回true 说明所有的表单域都填写正确。否则返回false
        if (this.checkValidity() === false) {
            $(this).addClass('was-validated')
            return false;
        }
        return true;
    })

</script>

</body>
</html>